package com.rxyb.security.gate.controller.reactive;

import cn.rxyb.core.respone.R;
import com.rxyb.security.db.po.SysRole;
import com.rxyb.security.service.SysRoleService;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author YJH
 * @version 1.0
 * @description 角色编号
 * @date 2020/7/13 11:35
 */
@RestController
@RequestMapping(value = "/role/")
public class RoleReactiveController {

    private final SysRoleService sysRoleServiceImpl;


    public RoleReactiveController(SysRoleService sysRoleServiceImpl) {
        this.sysRoleServiceImpl = sysRoleServiceImpl;
    }

    /**
     * 获取参数列表信息
     *
     * @return
     */
    @PostMapping(value = "selectList", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public R<List<SysRole>> selectList() {
        return R.ok(sysRoleServiceImpl.list());
    }
}
